const mockImageData = [
    { id: 1, url: 'https://img0.baidu.com/it/u=3267244253,462024830&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=800', tags: ['可爱', '头像'] },
    { id: 2, url: 'https://img0.baidu.com/it/u=2924144951,1297641533&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500', tags: ['动物', '壁纸'] },
    { id: 3, url: 'https://img1.baidu.com/it/u=2200238057,2026971139&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500', tags: ['风景', '人物'] },
];

const searchImages = (query) => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            const results = mockImageData.filter(image =>
                image.tags.some(tag => tag.includes(query))
            );
            resolve(results);
        }, 1000);
    });
    
};

export default searchImages;